<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="设备管理基本信息" bodyClass="white-bg" libs=["bootstrapSelect"]/>

<!--<div class="tab-content">-->
    <!--<div  class="tab-pane" id="tab_1_1">-->
        <div class="wrapper wrapper-content ibox-content">
            <@f.form id="task-form-complete" class="form-horizontal">
            <input name="id" value="${equipment.id}" type="hidden">
            <h4 class="form-header h4"><@ctx.i18n text = "基本信息"/></h4>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "设备编号"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="equipmentCode" value="${equipment.equipmentCode?default('')}" type="text"  readonly  >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "设备名称"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="equipmentName" value="${equipment.equipmentName?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "设备型号"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="equipmentModel" value="${equipment.equipmentModel?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "国标编号"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="standardCode" value="${equipment.standardCode?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "详细配置"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="configure" value="${equipment.configure?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "计量单位"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                                <@f.select name="meteringUnit" value="${equipment.meteringUnit?default('')}"
                                items=meteringList itemLabel="className" itemValue="className"
                                required=true/>
                                <!--<input class="form-control" name="meteringUnit" value="${equipment.meteringUnit?default('')}" type="text"   >-->
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "制造厂家"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="manufacturer" value="${equipment.manufacturer?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "设备分类"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                                <@f.treeselect  name="equipmentType" boxTitle="请选择设备分类" value="${equipment.equipmentType?default('')}"
                                url="bus/classify/treeData" keyId="className" keyName="className"
                                labelValue="${equipment.equipmentType?default('')}" correlationId="id" isSelectParent=true  placeholder="请选择设备分类"/>
                                <!--<input class="form-control" name="equipmentType" value="${equipment.equipmentType?default('')}" type="text"   >-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "入账日期"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">

                                <input class="form-control time-input" name="putTime" value="${equipment.putTime}"  data-type="date" data-format="yyyy-MM-dd HH:mm:ss" type="text"  >

                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "存放地点"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                                <@f.select name="depositAddr" value="${equipment.depositAddr?default('')}"
                                items=addrList itemLabel="className"  itemValue="className"
                                required=true/>
                                <!--<input class="form-control" name="depositAddr" value="${equipment.depositAddr?default('')}" type="text"   >-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "购买日期"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                                <input class="form-control time-input" name="purchaseTime" value="${equipment.purchaseTime}"  data-type="date" data-format="yyyy-MM-dd HH:mm:ss" type="text"  >
                                <!--<input class="form-control" name="purchaseTime" value="" type="text"  readonly >-->
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "使用部门"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                                <@f.select name="useDepartment" value="${equipment.useDepartment?default('')}"

                                items=useList itemLabel="className" itemValue="className"
                                required=true/>
                                <!--<input class="form-control" name="useDepartment" value="${equipment.useDepartment?default('')}" type="text"   >-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "使用情况"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                                <@f.select name="usages" value="${equipment.usages?default('')}"

                                items=usagesList itemLabel="className"  itemValue="className"
                                required=true/>
                                <!--<input class="form-control" name="usages" value="${equipment.usages?default('')}" type="text"   >-->
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "出厂日期"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                                <input class="form-control time-input" name="productionTime" value="${equipment.productionTime}"  data-type="date" data-format="yyyy-MM-dd HH:mm:ss" type="text"  >

                                <!--<input class="form-control" name="productionTime" value="" type="text"  readonly >-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "设备原值"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="equipmentValue" value="${equipment.equipmentValue?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "折旧方法"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <@f.select name="depreciation" value="${equipment.depreciation?default('')}"

                                items=depreciationList itemLabel="className"  itemValue="className"
                                required=true/>
                                <!--<input class="form-control" name="depreciation" value="${equipment.depreciation?default('')}" type="text"   >-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "增加方式"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="increase" value="${equipment.increase?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "保管人员"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                                <@f.select name="safekeeping" value="${equipment.safekeeping?default('')}"
                                items=safekeepingList itemLabel="className"  itemValue="className"
                                required=true/>

                                <!--<input class="form-control" name="safekeeping" value="${equipment.safekeeping?default('')}" type="text"   >-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "使用年限"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="age" value="${equipment.age?default('')}" type="text"  >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "净残值率"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="jingcanValue" value="${equipment.jingcanValue?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "净值"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="worth" value="${equipment.worth?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "累计折旧"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="accumulatedDepreciation" value="${equipment.accumulatedDepreciation?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "二维码"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="code" value="${equipment.code?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "条码宽度"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="codeWidth" value="${equipment.codeWidth?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符一"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="character1" value="${equipment.character1?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符二"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="character2" value="${equipment.character2?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符三"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="character3" value="${equipment.character3?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符四"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="character4" value="${equipment.character4?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符五"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="character5" value="${equipment.character5?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "字符六"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="character6" value="${equipment.character6?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "数值一"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="value1" value="${equipment.value1?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "数值二"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="value2" value="${equipment.value2?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "数值三"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="value3" value="${equipment.value3?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "计量时间"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
                                <!--<input class="form-control time-input" name="meterageTime"  data-type="date" data-format="yyyy-MM-dd HH:mm:ss" type="text"  >-->
                                <input class="form-control time-input" name="meterageTime" value="${equipment.meterageTime}"  data-type="date" data-format="yyyy-MM-dd HH:mm:ss" type="text"  >

                                <!--<input class="form-control" name="putTime" value="" type="text"  readonly >-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "计量公司"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="meterageCompany" value="${equipment.meterageCompany?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "计量公司编号"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="companyCode" value="${equipment.companyCode?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "测量范围"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="measuringRange" value="${equipment.measuringRange?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "备注"/>：</label>
                        <div class="col-sm-8">
                            <div class="input-group date">
                                <!--<span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->

                                <input class="form-control" name="remark" value="${equipment.remark?default('')}" type="text"   >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </@f.form>
        </div>
        <div class="hr-line-dashed"></div>
        <div class="row" style="text-align: center;" id="_addTab">

            <button type="button" class="btn btn-sm btn-primary" onclick="opt.form.submit()"><i class="fa fa-check"></i><@ctx.i18n text = "保存"/></button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="opt.modal.closeTab()"><i class="fa fa-reply-all"></i><@ctx.i18n text = "关闭"/></button>
        </div>
    <!--</div>-->



</div>






<@footer>
<script type="text/javascript">
    var prefix = baseURL + "bus/equipment";

    $('#tipBut button').click(function(){
        $('#comment').text($(this).text())
    });

    $("#task-form-complete").validate({
        focusCleanup: true
    });

    function tableCallback(id, event, index, layero, nodes){
        console.log("aaaaaaaaaaaaaaa")
        if(id == "projectName"){
            console.log("弹出表格选择===>>>>: id:" + id + "  event:" + event + " index:" + index + "  layero:"+ layero + " nodes:" + JSON.stringify(nodes));
            console.log(nodes.table[0]);
            var data = nodes.table[0];

            $("input[name=region]").val(data.region);

        }
    }

    function submitHandler() {
        if (opt.validate.form()) {
            opt.operate.saveTab(prefix + "/edit", $('#task-form-complete').serialize());
        }
    }
</script>
</@footer>
</@pageTheme>